/*
 * 文件名：IUserService.java
 * 版权：Copyright by www.wootide.com
 * 描述：对用户的业务层操作接口:add/del/get/mod/grant/start/stop
 * 修改人：lizl
 * 修改时间：2012-9-12
 * 跟踪单号：
 * 修改单号：
 * 修改内容：业务层接口
 */
package com.wootide.cms.manager.service;

import java.util.List;

import com.wootide.cms.common.manager.SHException;
import com.wootide.cms.manager.pojo.User;


/**
 * 〈一句话功能简述〉用户管理业务层接口<br>
 * 〈功能详细描述〉<br>
 *     对用户进行管理：<br>
 *     1.增加、删除、修改、查询；<br>
 *     2.授权、启用或停用；<br>
 *     3.异常的捕获但不处理，向上抛给Action来处理；<br>
 * 【说明】service层:add/del/mod/get——service层的增删改查 ;<br>
 * @author lizl
 * @version 2012-9-12
 * @see Iuserervice
 * @since
 */

public interface IUserService
{
    /**
     * Description: 增加用户接口<br>
     * Implement: 实现类：userServiceImpl<br>
     * @param user:需要增的用户对象<br>
     * @return：操作是否成功<br>
     * @see
     * @return boolean
     * @author lizl
     */
    public boolean addUser(User user) throws SHException;
    
    /**
     * Description: 修改用户接口<br>
     * Implement: 实现类：userServiceImpl<br>
     * @param user
     * @return
     * @see
     * @return boolean
     * @author lizl
     */
    public boolean modUser(User user) throws SHException;
    
    /**
     * Description: 通过ID查询单个用户<br>
     * Implement: 实现类：userServiceImpl<br>
     * @param user
     * @return
     * @see
     * @return user
     * @author lizl
     */
    public User getUserById(User user) throws SHException;
    
    /**
     * 
     * Description: <br>
     * Implement: <br>
     * @param paramMap
     * @return
     * @throws SHException
     * @see
     * @return User
     * @author qianfm
     */
    public User getUser(User user) throws SHException;
    
    /**
     * Description: 根据条件查询用户<br>
     * 1.【输入查询条件约束规定】这里暂定为用户属性：
     *     userID/userName/userMale/userState/userJob
     * Implement: 实现类：userServiceImpl<br>
     * @param user
     * @return
     * @see
     * @return List<user>
     * @author lizl
     */
    public int getUserCount(User user) throws SHException;
    
    /**
     * Description: 对用户进行授权：即授予某个角色<br>
     * Implement: 实现类：userServiceImpl<br>
     * @param user
     * @return
     * @see
     * @return boolean
     * @author lizl
     */
    //public boolean grantUser(User user, Role role) throws SHException;
    
    /**
     * Description: 启用某个用户<br>
     * Implement: 实现类：userServiceImpl<br>
     * @param user
     * @return
     * @see
     * @return boolean
     * @author lizl
     */
    public boolean startUser(User user) throws SHException;
    
    /**
     * Description: 停用某个用户<br>
     * Implement: 实现类：userServiceImpl<br>
     * @param user
     * @return:是否停用成功
     * @see
     * @return boolean
     * @author lizl
     */
    public boolean stopUser(User user) throws SHException;
    
    /**
     * Description: 用户分页查询，获取第几页的结果集合记录<br>
     * Implement: <br>
     * @param user：查询条件对象
     * @param start：UI界面显示的开始位置
     * @param pageSize：每页显示最大记录条数
     * @return
     * @throws SHException
     * @see
     * @return List<User>：返回某页的结果记录集合
     * @author Administrator
     */
    public List<User> getUserList(User user, int start, int pageSize)
            throws SHException;
    
    /**
     * Description:  获取所有用户<br>
     * Implement: <br>
     * @return
     * @throws SHException
     * @see
     * @return List<User>
     * @author Administrator
     */
    public List<User> getAllUsers() throws SHException;
    
}
